﻿/**
 * @author 毕伟伦
 * 2012-3-19 创建
 */
package cn.edu.zjusc.POJO;

import java.util.Date;
import java.math.*;

import javax.persistence.*;

import cn.edu.zjusc.Annotation.Pk;

@SuppressWarnings("serial")
@Entity
@Table(name = "studentbaseinfo")
/*
 * @SecondaryTables({
 * 
 * @SecondaryTable(name="studentapplyinfo",pkJoinColumns={@PrimaryKeyJoinColumn(name
 * ="ID")}),
 * 
 * @SecondaryTable(name="studentedubkinfo",pkJoinColumns={@PrimaryKeyJoinColumn(name
 * ="ID")}),
 * 
 * @SecondaryTable(name="studentextendinfo",pkJoinColumns={@PrimaryKeyJoinColumn(
 * name="ID")}) })
 */
public class StudentDetailInfo implements java.io.Serializable {
	@Pk
	private BigDecimal stubs_id;
	private String stubs_number;
	private String stubs_name;
	private String stubs_sex;
	private String stubs_avatar;
	private int stubs_majorID;
	private String stubs_class;
	private String stubs_regHome;
	private String stubs_isMarried;
	private String stubs_idCard;
	private Date stubs_birthday;
	private int stubs_raceID;
	private String stubs_family;
	private String stubs_pltAff;
	private Date stubs_partyJoinTime;
	private Date stubs_partyTransferTime;
	private int stubs_cityID;
	private String stubs_contactAddress;
	private String stubs_postCode;
	private String stubs_phoneNumber;
	private String stubs_email;
	private String stubs_hostel;
	private String stubs_IMNumber;
	private String stubs_enterSchShip;
	private String stubs_diploma;

	private StudentApplyInfo applyInfoBean;
	private StudentEduBkInfo2 eduBkInfoBean;
	private StudentExtendInfo extendInfoBean;

	private CityCode cityCode;
	private RaceCode raceCode;
	private MajorCode majorCode;

	public StudentDetailInfo() {
		this.stubs_id = new BigDecimal(0);
	}

	@Id
	@Column(name = "ID")
	public BigDecimal getStubs_id() {
		return stubs_id;
	}

	public void setStubs_id(BigDecimal stubs_id) {
		this.stubs_id = stubs_id;
	}

	@Column(name = "Number")
	public String getStubs_number() {
		return stubs_number;
	}

	public void setStubs_number(String stubs_number) {
		this.stubs_number = stubs_number;
	}

	@Column(name = "Name")
	public String getStubs_name() {
		return stubs_name;
	}

	public void setStubs_name(String stubs_name) {
		this.stubs_name = stubs_name;
	}

	@Column(name = "Sex")
	public String getStubs_sex() {
		return stubs_sex;
	}

	public void setStubs_sex(String stubs_sex) {
		this.stubs_sex = stubs_sex;
	}

	@Column(name = "Avatar")
	public String getStubs_avatar() {
		return stubs_avatar;
	}

	public void setStubs_avatar(String stubs_avatar) {
		this.stubs_avatar = stubs_avatar;
	}

	@Column(name = "MajorID")
	public int getStubs_majorID() {
		return stubs_majorID;
	}

	public void setStubs_majorID(int stubs_majorID) {
		this.stubs_majorID = stubs_majorID;
	}

	@Column(name = "Class")
	public String getStubs_class() {
		return stubs_class;
	}

	public void setStubs_class(String stubs_class) {
		this.stubs_class = stubs_class;
	}

	@Column(name = "RegHome")
	public String getStubs_regHome() {
		return stubs_regHome;
	}

	public void setStubs_regHome(String stubs_regHome) {
		this.stubs_regHome = stubs_regHome;
	}

	@Column(name = "IsMarried")
	public String getStubs_isMarried() {
		return stubs_isMarried;
	}

	public void setStubs_isMarried(String stubs_isMarried) {
		this.stubs_isMarried = stubs_isMarried;
	}

	@Column(name = "IDCard")
	public String getStubs_idCard() {
		return stubs_idCard;
	}

	public void setStubs_idCard(String stubs_idCard) {
		this.stubs_idCard = stubs_idCard;
	}

	@Column(name = "Birthday")
	public Date getStubs_birthday() {
		return stubs_birthday;
	}

	public void setStubs_birthday(Date stubs_birthday) {
		this.stubs_birthday = stubs_birthday;
	}

	@Column(name = "RaceID")
	public int getStubs_raceID() {
		return stubs_raceID;
	}

	public void setStubs_raceID(int stubs_raceID) {
		this.stubs_raceID = stubs_raceID;
	}

	@Column(name = "Family")
	public String getStubs_family() {
		return stubs_family;
	}

	public void setStubs_family(String stubs_family) {
		this.stubs_family = stubs_family;
	}

	@Column(name = "PltAff")
	public String getStubs_pltAff() {
		return stubs_pltAff;
	}

	public void setStubs_pltAff(String stubs_pltAff) {
		this.stubs_pltAff = stubs_pltAff;
	}

	@Column(name = "PartyJoinTime")
	public Date getStubs_partyJoinTime() {
		return stubs_partyJoinTime;
	}

	public void setStubs_partyJoinTime(Date stubs_partyJoinTime) {
		this.stubs_partyJoinTime = stubs_partyJoinTime;
	}

	@Column(name = "PartyTransferTime")
	public Date getStubs_partyTransferTime() {
		return stubs_partyTransferTime;
	}

	public void setStubs_partyTransferTime(Date stubs_partyTransferTime) {
		this.stubs_partyTransferTime = stubs_partyTransferTime;
	}

	@Column(name = "CityID")
	public int getStubs_cityID() {
		return stubs_cityID;
	}

	public void setStubs_cityID(int stubs_cityID) {
		this.stubs_cityID = stubs_cityID;
	}

	@Column(name = "ContactAddress")
	public String getStubs_contactAddress() {
		return stubs_contactAddress;
	}

	public void setStubs_contactAddress(String stubs_contactAddress) {
		this.stubs_contactAddress = stubs_contactAddress;
	}

	@Column(name = "PostCode")
	public String getStubs_postCode() {
		return stubs_postCode;
	}

	public void setStubs_postCode(String stubs_postCode) {
		this.stubs_postCode = stubs_postCode;
	}

	@Column(name = "PhoneNumber")
	public String getStubs_phoneNumber() {
		return stubs_phoneNumber;
	}

	public void setStubs_phoneNumber(String stubs_phoneNumber) {
		this.stubs_phoneNumber = stubs_phoneNumber;
	}

	@Column(name = "Email")
	public String getStubs_email() {
		return stubs_email;
	}

	public void setStubs_email(String stubs_email) {
		this.stubs_email = stubs_email;
	}

	@Column(name = "Hostel")
	public String getStubs_hostel() {
		return stubs_hostel;
	}

	public void setStubs_hostel(String stubs_hostel) {
		this.stubs_hostel = stubs_hostel;
	}

	@Column(name = "IMNumber")
	public String getStubs_IMNumber() {
		return stubs_IMNumber;
	}

	public void setStubs_IMNumber(String stubs_IMNumber) {
		this.stubs_IMNumber = stubs_IMNumber;
	}

	@Column(name = "EnterSchShip")
	public String getStubs_enterSchShip() {
		return stubs_enterSchShip;
	}

	public void setStubs_enterSchShip(String stubs_enterSchShip) {
		this.stubs_enterSchShip = stubs_enterSchShip;
	}

	@Column(name = "Diploma")
	public String getStubs_diploma() {
		return stubs_diploma;
	}

	public void setStubs_diploma(String stubs_diploma) {
		this.stubs_diploma = stubs_diploma;
	}

	/*
	 * 如下是外连接表
	 */

	@OneToOne(cascade = { CascadeType.ALL })
	@PrimaryKeyJoinColumn
	public StudentApplyInfo getApplyInfoBean() {
		return applyInfoBean;
	}

	public void setApplyInfoBean(StudentApplyInfo applyInfoBean) {
		this.applyInfoBean = applyInfoBean;
	}

	@OneToOne(cascade = { CascadeType.ALL })
	@PrimaryKeyJoinColumn
	public StudentEduBkInfo2 getEduBkInfoBean() {
		return eduBkInfoBean;
	}

	public void setEduBkInfoBean(StudentEduBkInfo2 eduBkInfoBean) {
		this.eduBkInfoBean = eduBkInfoBean;
	}

	@OneToOne(cascade = { CascadeType.ALL })
	@PrimaryKeyJoinColumn
	public StudentExtendInfo getExtendInfoBean() {
		return extendInfoBean;
	}

	public void setExtendInfoBean(StudentExtendInfo extendInfoBean) {
		this.extendInfoBean = extendInfoBean;
	}

	/*
	 * 代码表开始
	 */
	@OneToOne
	@JoinColumn(name = "RaceID", nullable = false, insertable = false, updatable = false)
	public RaceCode getRaceCode() {
		return raceCode;
	}

	public void setRaceCode(RaceCode raceCode) {
		this.raceCode = raceCode;
	}

	@OneToOne
	@JoinColumn(name = "MajorID", nullable = false, insertable = false, updatable = false)
	public MajorCode getMajorCode() {
		return majorCode;
	}

	public void setMajorCode(MajorCode majorCode) {
		this.majorCode = majorCode;
	}

	@OneToOne
	@JoinColumn(name = "CityID", nullable = false, insertable = false, updatable = false)
	public CityCode getCityCode() {
		return cityCode;
	}

	public void setCityCode(CityCode cityCode) {
		this.cityCode = cityCode;
	}

}
